home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / PPCToolbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  21.8 KB  |  524 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        PPCToolbox.h
  3.  
  4.      Contains:    Program-Program Communications Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1989-1993, 1995-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __PPCTOOLBOX__
  19. #define __PPCTOOLBOX__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __APPLETALK__
  25. #include <AppleTalk.h>
  26. #endif
  27.  
  28.  
  29.  
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50. typedef unsigned char                     PPCServiceType;
  51.  
  52. enum {
  53.     ppcServiceRealTime            = 1
  54. };
  55.  
  56. typedef short                             PPCLocationKind;
  57.  
  58. enum {
  59.     ppcNoLocation                = 0,                            /* There is no PPCLocName */
  60.     ppcNBPLocation                = 1,                            /* Use AppleTalk NBP      */
  61.     ppcNBPTypeLocation            = 2                                /* Used for specifying a location name type during PPCOpen only */
  62. };
  63.  
  64. typedef short                             PPCPortKinds;
  65.  
  66. enum {
  67.     ppcByCreatorAndType            = 1,                            /* Port type is specified as colloquial Mac creator and type */
  68.     ppcByString                    = 2                                /* Port type is in pascal string format */
  69. };
  70.  
  71. /* Values returned for request field in PPCInform call */
  72. typedef unsigned char                     PPCSessionOrigin;
  73.  
  74. enum {
  75.                                                                 /* Values returned for requestType field in PPCInform call */
  76.     ppcLocalOrigin                = 1,                            /* session originated from this machine */
  77.     ppcRemoteOrigin                = 2                                /* session originated from remote machine */
  78. };
  79.  
  80. typedef short                             PPCPortRefNum;
  81. typedef long                             PPCSessRefNum;
  82. struct PPCPortRec {
  83.     ScriptCode                         nameScript;                    /* script of name */
  84.     Str32Field                         name;                        /* name of port as seen in browser */
  85.     PPCPortKinds                     portKindSelector;            /* which variant */
  86.     union {
  87.         Str32                             portTypeStr;            /* pascal type string */
  88.         struct {
  89.             OSType                             portCreator;
  90.             OSType                             portType;
  91.         }                                 port;
  92.     }                                 u;
  93. };
  94. typedef struct PPCPortRec PPCPortRec;
  95.  
  96. typedef PPCPortRec *                    PPCPortPtr;
  97. struct LocationNameRec {
  98.     PPCLocationKind                 locationKindSelector;        /* which variant */
  99.     union {
  100.         EntityName                         nbpEntity;                /* NBP name entity */
  101.         Str32                             nbpType;                /* just the NBP type string, for PPCOpen */
  102.     }                                 u;
  103. };
  104. typedef struct LocationNameRec LocationNameRec;
  105.  
  106. typedef LocationNameRec *                LocationNamePtr;
  107. struct PortInfoRec {
  108.     SInt8                             filler1;
  109.     Boolean                         authRequired;
  110.     PPCPortRec                         name;
  111. };
  112. typedef struct PortInfoRec PortInfoRec;
  113.  
  114. typedef PortInfoRec *                    PortInfoPtr;
  115. typedef PortInfoRec *                    PortInfoArrayPtr;
  116. typedef union PPCParamBlockRec             PPCParamBlockRec;
  117. typedef PPCParamBlockRec *                PPCParamBlockPtr;
  118. typedef CALLBACK_API( void , PPCCompProcPtr )(PPCParamBlockPtr pb);
  119. typedef STACK_UPP_TYPE(PPCCompProcPtr)                             PPCCompUPP;
  120. #define PPCHeader \
  121.      Ptr            qLink;                   /* PPC's Internal Use */\
  122.      unsigned short csCode;                   /* Requested PPC command */\
  123.      unsigned short intUse;                   /* Internal Use */\
  124.      Ptr            intUsePtr;              /* Internal Use */\
  125.      PPCCompUPP     ioCompletion;            /* 12 --> Completion Routine */\
  126.      OSErr           ioResult;                  /* 16 <-- Command Result Code */\
  127.      unsigned long    Reserved[5];             /* Reserved for PPC, Don't use */
  128.  
  129. struct PPCOpenPBRec {
  130.     Ptr                             qLink;                        /* PPC's Internal Use */
  131.     unsigned short                     csCode;                        /* Requested PPC command */
  132.     unsigned short                     intUse;                        /* Internal Use */
  133.     Ptr                             intUsePtr;                    /* Internal Use */
  134.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  135.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  136.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  137.     PPCPortRefNum                     portRefNum;                    /* 38 <--   Port Reference */
  138.     long                             filler1;
  139.     PPCServiceType                     serviceType;                /* 44 -->    Bit field describing the requested port service */
  140.     UInt8                             resFlag;                    /* Must be set to 0 */
  141.     PPCPortPtr                         portName;                    /* 46 -->   PortName for PPC */
  142.     LocationNamePtr                 locationName;                /* 50 -->   If NBP Registration is required */
  143.     Boolean                         networkVisible;                /* 54 -->   make this network visible on network */
  144.     Boolean                         nbpRegistered;                /* 55 <--   The given location name was registered on the network */
  145. };
  146. typedef struct PPCOpenPBRec PPCOpenPBRec;
  147.  
  148. typedef PPCOpenPBRec *                    PPCOpenPBPtr;
  149. struct PPCInformPBRec {
  150.     Ptr                             qLink;                        /* PPC's Internal Use */
  151.     unsigned short                     csCode;                        /* Requested PPC command */
  152.     unsigned short                     intUse;                        /* Internal Use */
  153.     Ptr                             intUsePtr;                    /* Internal Use */
  154.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  155.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  156.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  157.     PPCPortRefNum                     portRefNum;                    /* 38 -->   Port Identifier */
  158.     PPCSessRefNum                     sessRefNum;                    /* 40 <--   Session Reference */
  159.     PPCServiceType                     serviceType;                /* 44 <--   Status Flags for type of session, local, remote */
  160.     Boolean                         autoAccept;                    /* 45 -->   if true session will be accepted automatically */
  161.     PPCPortPtr                         portName;                    /* 46 -->   Buffer for Source PPCPortRec */
  162.     LocationNamePtr                 locationName;                /* 50 -->   Buffer for Source LocationNameRec */
  163.     StringPtr                         userName;                    /* 54 -->   Buffer for Soure user's name trying to link. */
  164.     unsigned long                     userData;                    /* 58 <--   value included in PPCStart's userData */
  165.     PPCSessionOrigin                 requestType;                /* 62 <--   Local or Network */
  166.     SInt8                             filler;
  167. };
  168. typedef struct PPCInformPBRec PPCInformPBRec;
  169.  
  170. typedef PPCInformPBRec *                PPCInformPBPtr;
  171. struct PPCStartPBRec {
  172.     Ptr                             qLink;                        /* PPC's Internal Use */
  173.     unsigned short                     csCode;                        /* Requested PPC command */
  174.     unsigned short                     intUse;                        /* Internal Use */
  175.     Ptr                             intUsePtr;                    /* Internal Use */
  176.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  177.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  178.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  179.     PPCPortRefNum                     portRefNum;                    /* 38 -->   Port Identifier */
  180.     PPCSessRefNum                     sessRefNum;                    /* 40 <--   Session Reference */
  181.     PPCServiceType                     serviceType;                /* 44 <--   Actual service method (realTime) */
  182.     UInt8                             resFlag;                    /* 45 -->   Must be set to 0  */
  183.     PPCPortPtr                         portName;                    /* 46 -->   Destination portName */
  184.     LocationNamePtr                 locationName;                /* 50 -->   NBP or NAS style service location name */
  185.     unsigned long                     rejectInfo;                    /* 54 <--   reason for rejecting the session request */
  186.     unsigned long                     userData;                    /* 58 -->   Copied to destination PPCInform parameter block */
  187.     unsigned long                     userRefNum;                    /* 62 -->   userRefNum (obtained during login process)  */
  188. };
  189. typedef struct PPCStartPBRec PPCStartPBRec;
  190.  
  191. typedef PPCStartPBRec *                    PPCStartPBPtr;
  192. struct PPCAcceptPBRec {
  193.     Ptr                             qLink;                        /* PPC's Internal Use */
  194.     unsigned short                     csCode;                        /* Requested PPC command */
  195.     unsigned short                     intUse;                        /* Internal Use */
  196.     Ptr                             intUsePtr;                    /* Internal Use */
  197.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  198.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  199.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  200.     short                             filler1;
  201.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  202. };
  203. typedef struct PPCAcceptPBRec PPCAcceptPBRec;
  204.  
  205. typedef PPCAcceptPBRec *                PPCAcceptPBPtr;
  206. struct PPCRejectPBRec {
  207.     Ptr                             qLink;                        /* PPC's Internal Use */
  208.     unsigned short                     csCode;                        /* Requested PPC command */
  209.     unsigned short                     intUse;                        /* Internal Use */
  210.     Ptr                             intUsePtr;                    /* Internal Use */
  211.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  212.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  213.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  214.     short                             filler1;
  215.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  216.     short                             filler2;
  217.     long                             filler3;
  218.     long                             filler4;
  219.     unsigned long                     rejectInfo;                    /* 54 -->   reason for rejecting the session request  */
  220. };
  221. typedef struct PPCRejectPBRec PPCRejectPBRec;
  222.  
  223. typedef PPCRejectPBRec *                PPCRejectPBPtr;
  224. struct PPCWritePBRec {
  225.     Ptr                             qLink;                        /* PPC's Internal Use */
  226.     unsigned short                     csCode;                        /* Requested PPC command */
  227.     unsigned short                     intUse;                        /* Internal Use */
  228.     Ptr                             intUsePtr;                    /* Internal Use */
  229.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  230.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  231.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  232.     short                             filler1;
  233.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  234.     Size                             bufferLength;                /* 44 -->   Length of the message buffer */
  235.     Size                             actualLength;                /* 48 <--   Actual Length Written */
  236.     Ptr                             bufferPtr;                    /* 52 -->   Pointer to message buffer */
  237.     Boolean                         more;                        /* 56 -->   if more data in this block will be written */
  238.     SInt8                             filler2;
  239.     unsigned long                     userData;                    /* 58 -->   Message block userData Uninterpreted by PPC */
  240.     OSType                             blockCreator;                /* 62 -->   Message block creator Uninterpreted by PPC */
  241.     OSType                             blockType;                    /* 66 -->   Message block type Uninterpreted by PPC */
  242. };
  243. typedef struct PPCWritePBRec PPCWritePBRec;
  244.  
  245. typedef PPCWritePBRec *                    PPCWritePBPtr;
  246. struct PPCReadPBRec {
  247.     Ptr                             qLink;                        /* PPC's Internal Use */
  248.     unsigned short                     csCode;                        /* Requested PPC command */
  249.     unsigned short                     intUse;                        /* Internal Use */
  250.     Ptr                             intUsePtr;                    /* Internal Use */
  251.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  252.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  253.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  254.     short                             filler1;
  255.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  256.     Size                             bufferLength;                /* 44 -->   Length of the message buffer */
  257.     Size                             actualLength;                /* 48 <--   Actual length read */
  258.     Ptr                             bufferPtr;                    /* 52 -->   Pointer to message buffer */
  259.     Boolean                         more;                        /* 56 <--   if true more data in this block to be read */
  260.     SInt8                             filler2;
  261.     unsigned long                     userData;                    /* 58 <--   Message block userData Uninterpreted by PPC */
  262.     OSType                             blockCreator;                /* 62 <--   Message block creator Uninterpreted by PPC */
  263.     OSType                             blockType;                    /* 66 <--   Message block type Uninterpreted by PPC */
  264. };
  265. typedef struct PPCReadPBRec PPCReadPBRec;
  266.  
  267. typedef PPCReadPBRec *                    PPCReadPBPtr;
  268. struct PPCEndPBRec {
  269.     Ptr                             qLink;                        /* PPC's Internal Use */
  270.     unsigned short                     csCode;                        /* Requested PPC command */
  271.     unsigned short                     intUse;                        /* Internal Use */
  272.     Ptr                             intUsePtr;                    /* Internal Use */
  273.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  274.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  275.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  276.     short                             filler1;
  277.     PPCSessRefNum                     sessRefNum;                    /* 40 -->   Session Reference */
  278. };
  279. typedef struct PPCEndPBRec PPCEndPBRec;
  280.  
  281. typedef PPCEndPBRec *                    PPCEndPBPtr;
  282. struct PPCClosePBRec {
  283.     Ptr                             qLink;                        /* PPC's Internal Use */
  284.     unsigned short                     csCode;                        /* Requested PPC command */
  285.     unsigned short                     intUse;                        /* Internal Use */
  286.     Ptr                             intUsePtr;                    /* Internal Use */
  287.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  288.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  289.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  290.     PPCPortRefNum                     portRefNum;                    /* 38 -->   Port Identifier */
  291. };
  292. typedef struct PPCClosePBRec PPCClosePBRec;
  293.  
  294. typedef PPCClosePBRec *                    PPCClosePBPtr;
  295. struct IPCListPortsPBRec {
  296.     Ptr                             qLink;                        /* PPC's Internal Use */
  297.     unsigned short                     csCode;                        /* Requested PPC command */
  298.     unsigned short                     intUse;                        /* Internal Use */
  299.     Ptr                             intUsePtr;                    /* Internal Use */
  300.     PPCCompUPP                         ioCompletion;                /* 12 -->    Completion Routine */
  301.     OSErr                             ioResult;                    /* 16 <--     Command Result Code */
  302.     unsigned long                     Reserved[5];                /* Reserved for PPC, Don't use */
  303.     short                             filler1;
  304.     unsigned short                     startIndex;                    /* 40 -->   Start Index */
  305.     unsigned short                     requestCount;                /* 42 -->   Number of entries to be returned */
  306.     unsigned short                     actualCount;                /* 44 <--   Actual Number of entries to be returned */
  307.     PPCPortPtr                         portName;                    /* 46 -->   PortName Match */
  308.     LocationNamePtr                 locationName;                /* 50 -->   NBP or NAS type name to locate the Port Location */
  309.     PortInfoArrayPtr                 bufferPtr;                    /* 54 -->   Pointer to a buffer requestCount*sizeof(PortInfo) bytes big */
  310. };
  311. typedef struct IPCListPortsPBRec IPCListPortsPBRec;
  312.  
  313. typedef IPCListPortsPBRec *                IPCListPortsPBPtr;
  314. union PPCParamBlockRec {
  315.     PPCOpenPBRec                     openParam;
  316.     PPCInformPBRec                     informParam;
  317.     PPCStartPBRec                     startParam;
  318.     PPCAcceptPBRec                     acceptParam;
  319.     PPCRejectPBRec                     rejectParam;
  320.     PPCWritePBRec                     writeParam;
  321.     PPCReadPBRec                     readParam;
  322.     PPCEndPBRec                     endParam;
  323.     PPCClosePBRec                     closeParam;
  324.     IPCListPortsPBRec                 listPortsParam;
  325. };
  326.  
  327. /*  PPC Calling Conventions  */
  328.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  329.                                                                                             #pragma parameter __D0 PPCInit
  330.                                                                                             #endif
  331. EXTERN_API( OSErr )
  332. PPCInit                            (void)                                                        TWOWORDINLINE(0x7000, 0xA0DD);
  333.  
  334.  
  335.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  336.                                                                                             #pragma parameter __D0 PPCOpenSync(__A0)
  337.                                                                                             #endif
  338. EXTERN_API( OSErr )
  339. PPCOpenSync                        (PPCOpenPBPtr             pb)                                    TWOWORDINLINE(0x7001, 0xA0DD);
  340.  
  341.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  342.                                                                                             #pragma parameter __D0 PPCOpenAsync(__A0)
  343.                                                                                             #endif
  344. EXTERN_API( OSErr )
  345. PPCOpenAsync                    (PPCOpenPBPtr             pb)                                    TWOWORDINLINE(0x7001, 0xA4DD);
  346.  
  347.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  348.                                                                                             #pragma parameter __D0 PPCInformSync(__A0)
  349.                                                                                             #endif
  350. EXTERN_API( OSErr )
  351. PPCInformSync                    (PPCInformPBPtr         pb)                                    TWOWORDINLINE(0x7003, 0xA0DD);
  352.  
  353.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  354.                                                                                             #pragma parameter __D0 PPCInformAsync(__A0)
  355.                                                                                             #endif
  356. EXTERN_API( OSErr )
  357. PPCInformAsync                    (PPCInformPBPtr         pb)                                    TWOWORDINLINE(0x7003, 0xA4DD);
  358.  
  359.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  360.                                                                                             #pragma parameter __D0 PPCStartSync(__A0)
  361.                                                                                             #endif
  362. EXTERN_API( OSErr )
  363. PPCStartSync                    (PPCStartPBPtr             pb)                                    TWOWORDINLINE(0x7002, 0xA0DD);
  364.  
  365.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  366.                                                                                             #pragma parameter __D0 PPCStartAsync(__A0)
  367.                                                                                             #endif
  368. EXTERN_API( OSErr )
  369. PPCStartAsync                    (PPCStartPBPtr             pb)                                    TWOWORDINLINE(0x7002, 0xA4DD);
  370.  
  371.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  372.                                                                                             #pragma parameter __D0 PPCAcceptSync(__A0)
  373.                                                                                             #endif
  374. EXTERN_API( OSErr )
  375. PPCAcceptSync                    (PPCAcceptPBPtr         pb)                                    TWOWORDINLINE(0x7004, 0xA0DD);
  376.  
  377.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  378.                                                                                             #pragma parameter __D0 PPCAcceptAsync(__A0)
  379.                                                                                             #endif
  380. EXTERN_API( OSErr )
  381. PPCAcceptAsync                    (PPCAcceptPBPtr         pb)                                    TWOWORDINLINE(0x7004, 0xA4DD);
  382.  
  383.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  384.                                                                                             #pragma parameter __D0 PPCRejectSync(__A0)
  385.                                                                                             #endif
  386. EXTERN_API( OSErr )
  387. PPCRejectSync                    (PPCRejectPBPtr         pb)                                    TWOWORDINLINE(0x7005, 0xA0DD);
  388.  
  389.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  390.                                                                                             #pragma parameter __D0 PPCRejectAsync(__A0)
  391.                                                                                             #endif
  392. EXTERN_API( OSErr )
  393. PPCRejectAsync                    (PPCRejectPBPtr         pb)                                    TWOWORDINLINE(0x7005, 0xA4DD);
  394.  
  395.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  396.                                                                                             #pragma parameter __D0 PPCWriteSync(__A0)
  397.                                                                                             #endif
  398. EXTERN_API( OSErr )
  399. PPCWriteSync                    (PPCWritePBPtr             pb)                                    TWOWORDINLINE(0x7006, 0xA0DD);
  400.  
  401.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  402.                                                                                             #pragma parameter __D0 PPCWriteAsync(__A0)
  403.                                                                                             #endif
  404. EXTERN_API( OSErr )
  405. PPCWriteAsync                    (PPCWritePBPtr             pb)                                    TWOWORDINLINE(0x7006, 0xA4DD);
  406.  
  407.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  408.                                                                                             #pragma parameter __D0 PPCReadSync(__A0)
  409.                                                                                             #endif
  410. EXTERN_API( OSErr )
  411. PPCReadSync                        (PPCReadPBPtr             pb)                                    TWOWORDINLINE(0x7007, 0xA0DD);
  412.  
  413.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  414.                                                                                             #pragma parameter __D0 PPCReadAsync(__A0)
  415.                                                                                             #endif
  416. EXTERN_API( OSErr )
  417. PPCReadAsync                    (PPCReadPBPtr             pb)                                    TWOWORDINLINE(0x7007, 0xA4DD);
  418.  
  419.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  420.                                                                                             #pragma parameter __D0 PPCEndSync(__A0)
  421.                                                                                             #endif
  422. EXTERN_API( OSErr )
  423. PPCEndSync                        (PPCEndPBPtr             pb)                                    TWOWORDINLINE(0x7008, 0xA0DD);
  424.  
  425.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  426.                                                                                             #pragma parameter __D0 PPCEndAsync(__A0)
  427.                                                                                             #endif
  428. EXTERN_API( OSErr )
  429. PPCEndAsync                        (PPCEndPBPtr             pb)                                    TWOWORDINLINE(0x7008, 0xA4DD);
  430.  
  431.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  432.                                                                                             #pragma parameter __D0 PPCCloseSync(__A0)
  433.                                                                                             #endif
  434. EXTERN_API( OSErr )
  435. PPCCloseSync                    (PPCClosePBPtr             pb)                                    TWOWORDINLINE(0x7009, 0xA0DD);
  436.  
  437.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  438.                                                                                             #pragma parameter __D0 PPCCloseAsync(__A0)
  439.                                                                                             #endif
  440. EXTERN_API( OSErr )
  441. PPCCloseAsync                    (PPCClosePBPtr             pb)                                    TWOWORDINLINE(0x7009, 0xA4DD);
  442.  
  443.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  444.                                                                                             #pragma parameter __D0 IPCListPortsSync(__A0)
  445.                                                                                             #endif
  446. EXTERN_API( OSErr )
  447. IPCListPortsSync                (IPCListPortsPBPtr         pb)                                    TWOWORDINLINE(0x700A, 0xA0DD);
  448.  
  449.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  450.                                                                                             #pragma parameter __D0 IPCListPortsAsync(__A0)
  451.                                                                                             #endif
  452. EXTERN_API( OSErr )
  453. IPCListPortsAsync                (IPCListPortsPBPtr         pb)                                    TWOWORDINLINE(0x700A, 0xA4DD);
  454.  
  455. EXTERN_API( OSErr )
  456. DeleteUserIdentity                (unsigned long             userRef);
  457.  
  458. EXTERN_API( OSErr )
  459. GetDefaultUser                    (unsigned long *        userRef,
  460.                                  Str32                     userName);
  461.  
  462. EXTERN_API( OSErr )
  463. StartSecureSession                (PPCStartPBPtr             pb,
  464.                                  Str32                     userName,
  465.                                  Boolean                 useDefault,
  466.                                  Boolean                 allowGuest,
  467.                                  Boolean *                guestSelected,
  468.                                  ConstStr255Param         prompt);
  469.  
  470. typedef CALLBACK_API( Boolean , PPCFilterProcPtr )(LocationNamePtr name, PortInfoPtr port);
  471. typedef STACK_UPP_TYPE(PPCFilterProcPtr)                         PPCFilterUPP;
  472. enum { uppPPCCompProcInfo = 0x000000C0 };                         /* pascal no_return_value Func(4_bytes) */
  473. enum { uppPPCFilterProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  474. #define NewPPCCompProc(userRoutine)                             (PPCCompUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture())
  475. #define NewPPCFilterProc(userRoutine)                             (PPCFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture())
  476. #define CallPPCCompProc(userRoutine, pb)                         CALL_ONE_PARAMETER_UPP((userRoutine), uppPPCCompProcInfo, (pb))
  477. #define CallPPCFilterProc(userRoutine, name, port)                 CALL_TWO_PARAMETER_UPP((userRoutine), uppPPCFilterProcInfo, (name), (port))
  478. EXTERN_API( OSErr )
  479. PPCBrowser                        (ConstStr255Param         prompt,
  480.                                  ConstStr255Param         applListLabel,
  481.                                  Boolean                 defaultSpecified,
  482.                                  LocationNameRec *        theLocation,
  483.                                  PortInfoRec *            thePortInfo,
  484.                                  PPCFilterUPP             portFilter,
  485.                                  ConstStr32Param         theLocNBPType)                        THREEWORDINLINE(0x303C, 0x0D00, 0xA82B);
  486.  
  487.  
  488. /*
  489.   The ParamBlock calls with the "Sync" or "Async" suffix are being phased out.
  490. */
  491. #define PPCOpen(pb, async)      ((async) ? PPCOpenAsync(pb)      : PPCOpenSync(pb))
  492. #define PPCInform(pb, async)    ((async) ? PPCInformAsync(pb)    : PPCInformSync(pb))
  493. #define PPCStart(pb, async)     ((async) ? PPCStartAsync(pb)     : PPCStartSync(pb))
  494. #define PPCAccept(pb, async)    ((async) ? PPCAcceptAsync(pb)    : PPCAcceptSync(pb))
  495. #define PPCReject(pb, async)    ((async) ? PPCRejectAsync(pb)    : PPCRejectSync(pb))
  496. #define PPCWrite(pb, async)     ((async) ? PPCWriteAsync(pb)     : PPCWriteSync(pb))
  497. #define PPCRead(pb, async)      ((async) ? PPCReadAsync(pb)      : PPCReadSync(pb))
  498. #define PPCEnd(pb, async)       ((async) ? PPCEndAsync(pb)       : PPCEndSync(pb))
  499. #define PPCClose(pb, async)     ((async) ? PPCCloseAsync(pb)     : PPCCloseSync(pb))
  500. #define IPCListPorts(pb, async) ((async) ? IPCListPortsAsync(pb) : IPCListPortsSync(pb))
  501.  
  502.  
  503.  
  504. #if PRAGMA_STRUCT_ALIGN
  505.     #pragma options align=reset
  506. #elif PRAGMA_STRUCT_PACKPUSH
  507.     #pragma pack(pop)
  508. #elif PRAGMA_STRUCT_PACK
  509.     #pragma pack()
  510. #endif
  511.  
  512. #ifdef PRAGMA_IMPORT_OFF
  513. #pragma import off
  514. #elif PRAGMA_IMPORT
  515. #pragma import reset
  516. #endif
  517.  
  518. #ifdef __cplusplus
  519. }
  520. #endif
  521.  
  522. #endif /* __PPCTOOLBOX__ */
  523.  
  524.